;----------------------------------------
;A BIG THANKS TO Dan Englender FOR THE ROUTINES IN THESE MACROS,
;PROVIDED WITH HIS "SLIDE" INTERPRETER
;http://www.detachedsolutions.com/slide/SLIDE.zip
;----------------------------------------


LineBlack .equ 1
LineWhite .equ 0
LineInverse .equ 2

RectangleOutlineBlack EQU 1
RectangleOutlineWhite EQU 0
RectangleOutlineInverse EQU 2
RectangleFilledWhite EQU 4
RectangleFilledBlack EQU 5
RectangleFilledInverse EQU 6


xdir .equ appbackupscreen + 760
ydir .equ appbackupscreen + 761
LineColor .equ appbackupscreen + 762

#macro DrawLine(w,x,y,z, Color) 

 LD hl, w*256+x
 LD de, y*256+z
 LD a, Color
 LD (LineColor), a
 CALL _Line_

#endmacro


#macro DrawSmallText(y, x, TextVariable)


 LD hl,x*256+y
 LD (penCol),hl
 LD HL, TextVariable
 LD DE, OP1
 LD BC, 14
 LDIR
 LD HL, OP1
 B_CALL _VPutS


#endmacro

#macro DrawSmallTextVariableLength(y, x, TextVariable, Length)


 LD hl,x*256+y
 LD (penCol),hl
 LD HL, TextVariable
 LD DE, OP1
 LD BC, Length
 LDIR
 LD HL, OP1
 B_CALL _VPutS


#endmacro

#macro DrawA(y, x)

 push hl
 push de
 push bc
 push af
 push ix
 LD hl,x*256+y
 LD (curRow),hl
 LD H,0
 LD L, A
 B_CALL _DispHL
 B_CALL _getKey
 pop ix
 pop af
 pop bc
 pop de
 pop hl
#endmacro

#macro DrawHL(y, x)

 
 push de
 push bc
 push af
 push ix
 push hl
 LD hl,x*256+y
 LD (curRow),hl
 pop hl
 push hl
 B_CALL _DispHL
 B_CALL _getKey
 pop hl
 pop ix
 pop af
 pop bc
 pop de
 
#endmacro
#macro DrawSmallCharacter(y, x, Character)

 LD hl,x*256+y
 LD (penCol),hl
 LD A, Character
 B_CALL _VPutMap

#endmacro

#macro DrawSmallCharacter2(y, x, Variable)

 LD hl,x*256+y
 LD (penCol),hl
 LD A, (Variable)
 B_CALL _VPutMap

#endmacro

#macro DrawRectangle(w,x,y,z, Color)

 LD de, w*256+x
 LD bc, y*256+z
 LD a, Color
 LD (LineColor), a
 Call _Rectangle_

#endmacro



